<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="libman.css">
<TITLE>
Internals
</TITLE>
</HEAD>
<BODY >
<A HREF="libman035.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman032.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman037.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc73">6.4</A>&nbsp;&nbsp;Internals</H2>

Internally, symbolic domains are mapped to integer ranges from 1 up to
the number of domain elements. The first value in the domain
declaration corresponds to 1, the second to 2 and so on. Similarly,
symbolic domain variables can be mapped to a corresponding IC integer
variable. This mapping is accessible through the predicate
<A HREF="../bips/lib/ic_symbolic/symbol_domain_index-3.html"><B>symbol_domain_index/3</B></A><A NAME="@default200"></A>:
<BLOCKQUOTE CLASS="quote"><PRE CLASS="verbatim">
?- symbol_domain_index(fr, D, I).
D = weekday
I = 5
Yes (0.00s cpu)

?- X &amp;:: weekday, symbol_domain_index(X, D, I).
X = X{[mo, tu, we, th, fr, sa, su]}
D = weekday
I = I{1 .. 7}
Yes (0.00s cpu)

?- X &amp;:: weekday, X &amp;\= we, symbol_domain_index(X, D, I).
X = X{[mo, tu, th, fr, sa, su]}
D = weekday
I = I{[1, 2, 4 .. 7]}
Yes (0.00s cpu)
</PRE></BLOCKQUOTE>
The integer variable I mirrors the domain of the symbolic variable X and vice versa.<BR>
<BR>
<HR>
<A HREF="libman035.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman032.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman037.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
